<template>
    <div>
        <!-- ref 相当于原生DOM的 id -->
        <h2 v-text="msg" ref="title"></h2>
        <button @click="showDOM">点我输出DOM</button>
        <MySchool></MySchool>
    </div>
</template>

<script>
    import MySchool from '../src/components/MySchool.vue'
    export default {
        name:'App',
        components:{MySchool},
        data() {
            return {
                msg:'欢迎学习Vue',
            }
        },
        methods: {
            showDOM() {
                console.log(this.$refs)
            },
        },
    }
</script>

<style>

</style>